Optimal. Leaf size=42 \[ -\frac {(a C+b B) \log (\cos (c+d x))}{d}+x (a B-b C)+\frac {b C \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3632, 3525, 3475} \[ -\frac {(a C+b B) \log (\cos (c+d x))}{d}+x (a B-b C)+\frac {b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3525
Rule 3632
Rubi steps
\begin {align*} \int \cot (c+d x) (a+b \tan (c+d x)) \left (B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\int (a+b \tan (c+d x)) (B+C \tan (c+d x)) \, dx\\ &=(a B-b C) x+\frac {b C \tan (c+d x)}{d}+(b B+a C) \int \tan (c+d x) \, dx\\ &=(a B-b C) x-\frac {(b B+a C) \log (\cos (c+d x))}{d}+\frac {b C \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 59, normalized size = 1.40 \[ a B x-\frac {a C \log (\cos (c+d x))}{d}-\frac {b B \log (\cos (c+d x))}{d}-\frac {b C \tan ^{-1}(\tan (c+d x))}{d}+\frac {b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.06, size = 50, normalized size = 1.19 \[ \frac {2 \, {\left (B a - C b\right )} d x + 2 \, C b \tan \left (d x + c\right ) - {\left (C a + B b\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.27, size = 50, normalized size = 1.19 \[ \frac {2 \, C b \tan \left (d x + c\right ) + 2 \, {\left (B a - C b\right )} {\left (d x + c\right )} + {\left (C a + B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 66, normalized size = 1.57 \[ a B x -b C x -\frac {b B \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {B a c}{d}+\frac {b C \tan \left (d x +c \right )}{d}-\frac {a C \ln \left (\cos \left (d x +c \right )\right )}{d}-\frac {C b c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.60, size = 50, normalized size = 1.19 \[ \frac {2 \, C b \tan \left (d x + c\right ) + 2 \, {\left (B a - C b\right )} {\left (d x + c\right )} + {\left (C a + B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.79, size = 58, normalized size = 1.38 \[ B\,a\,x-C\,b\,x+\frac {C\,b\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {B\,b\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d}+\frac {C\,a\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.65, size = 82, normalized size = 1.95 \[ \begin {cases} B a x + \frac {B b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {C a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - C b x + \frac {C b \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan {\relax (c )}\right ) \left (B \tan {\relax (c )} + C \tan ^{2}{\relax (c )}\right ) \cot {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________